import time

# 方法1
from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.common.by import By

wd = webdriver.Chrome(service=Service(".\chromedriver_win136.exe"))
wd.get("https://pvp.qq.com/web201605/herolist.shtml")
# 获取本周免费英雄
radio = wd.find_element(By.CSS_SELECTOR, "span[class='ms-radio']:first-child")

time.sleep(1)
radio.click()
time.sleep(1)
heros = wd.find_elements(By.CSS_SELECTOR, ".herolist > li")

print(len(heros))
for h in heros:
    print(h.text)

time.sleep(10)

# 这个游戏一共有几个英雄？每个类别(战士刺客等)，的英雄数分别为多少？
